package org.com.app.knock;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.app.lazyload.ImageLoader2;
import com.knock.app.R;

public class ShowPopUp extends Activity implements OnClickListener {

	Button ok;
	Button cancel;
	
	boolean click = true;
	public static ImageLoader2 imageLoader;
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		try {
			imageLoader = new ImageLoader2(this);
			Bundle extras = getIntent().getExtras();
			setContentView(R.layout.popupdialog);
			if (extras != null) {
				try {
					String data_push = extras.getString("data_push");
					setTitle(null);
					TextView title = (TextView) findViewById(R.id.durationTitle);
					title.setText(data_push);
					
					String img_icon = extras.getString("customdata");
					ImageView imageView = (ImageView) findViewById(R.id.imageView1);
					imageLoader.DisplayImage(img_icon, imageView);
				} catch (Exception e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
			
			ok = (Button)findViewById(R.id.popOkB);
			ok.setOnClickListener(this);
//			cancel = (Button)findViewById(R.id.popCancelB);
//			cancel.setOnClickListener(this);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}

	@Override
	public void onClick(View arg0) {
		// TODO Auto-generated method stub
		finish();
	}
}